<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>销售数据管理系统</title>
  <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/4.3.1/css/bootstrap.min.css">
  <link rel="stylesheet" href="https://" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
</head>

<body>
<div class="container">
  <h1>销售数据管理系统</h1>
  <hr>
  <h2>更新销售数据</h2>

  <form action="#" th:action="@{/savaSale}" th:object="${sale}" method="POST">

    <!-- Add hidden form field to handle update -->
    <input type="hidden" th:field="*{id}" />

    <input type="text" th:field="*{customerName}" class="form-control mb-4 col-4">

    <input type="text" th:field="*{quantity}" class="form-control mb-4 col-4">

    <input type="text" th:field="*{totalAmount}" class="form-control mb-4 col-4">

    <input type="text" th:field="*{date}" class="form-control mb-4 col-4">

    <button type="submit" class="btn btn-info col-2"> 更新销售数据 </button>
  </form>

  <hr>

  <a th:href="@{/}"> 返回销售数据列表 </a>
</div>
</body>

</html>